<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">
<meta content="HashTable,com.developmentarc.core.datastructures.utils.HashTable,isEmpty,length,addItem,containsItem,containsKey,getAllItems,getAllKeys,getItem,getKeyAt,remove,removeAll" name="keywords">
<title>com.developmentarc.core.datastructures.utils.HashTable</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'HashTable - DevelopmentArc Core API Documentation';
				var baseRef = '../../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">DevelopmentArc Core API</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../index-list.html')" href="../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../index.html?com/developmentarc/framework/datastructures/utils/HashTable.html&amp;com/developmentarc/framework/datastructures/utils/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;HashTable</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class HashTable"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.developmentarc.core.datastructures.utils</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class HashTable</td>
</tr>
</table>
<p></p>
  The hash table is similar to a Dictionary in that a key object is used to map data. Unlike a Dictionary the HashTable behaves similar to an Array
  providing the ability check length and get itmes by position. 
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#isEmpty">isEmpty</a> : Boolean<div class="summaryTableDescription">[read-only]
   Used to determine if there are currently item pairs in the table.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#length">length</a> : int<div class="summaryTableDescription">[read-only]
   Returns the number of items currently inside the HashTable.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#HashTable()">HashTable</a>()</div>
<div class="summaryTableDescription">
   Constructor for the HashTable.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addItem()">addItem</a>(key:*, item:*):void</div>
<div class="summaryTableDescription">
   Adds a key/item pair to the HashTable.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#containsItem()">containsItem</a>(item:*):Boolean</div>
<div class="summaryTableDescription">
   Looks up the requested item and returns true if the item is contained, false if it is not.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#containsKey()">containsKey</a>(key:*):Boolean</div>
<div class="summaryTableDescription">
   Looks up the requested key and returns true if the key is contained, false if it is not.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getAllItems()">getAllItems</a>():Array</div>
<div class="summaryTableDescription">
   Returns all items stored in the HashTable.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getAllKeys()">getAllKeys</a>():Array</div>
<div class="summaryTableDescription">
   Returns all keys stored in the HashTable.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getItem()">getItem</a>(key:*):*</div>
<div class="summaryTableDescription">
   Returns the item for the specified key, if the key is not found then the method returns null.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getKeyAt()">getKeyAt</a>(position:int):*</div>
<div class="summaryTableDescription">
   Returns the key at a specified position if the HashTable has that position available.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#remove()">remove</a>(key:*):void</div>
<div class="summaryTableDescription">
   Removes an item/key pair based on the key provided.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeAll()">removeAll</a>():void</div>
<div class="summaryTableDescription">
   Removes all items and keys from the HashTable.</div>
</td><td class="summaryTableOwnerCol">HashTable</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="isEmpty"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isEmpty</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>isEmpty:Boolean</code>&nbsp;&nbsp;[read-only]<p>
   Used to determine if there are currently item pairs in the table.
    
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get isEmpty():Boolean</code>
<br>
</div>
<a name="length"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">length</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>length:int</code>&nbsp;&nbsp;[read-only]<p>
   Returns the number of items currently inside the HashTable.
    
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get length():int</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="HashTable()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">HashTable</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function HashTable()</code><p>
   Constructor for the HashTable. 
   
   </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addItem()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addItem</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function addItem(key:*, item:*):void</code><p>
   Adds a key/item pair to the HashTable.  This enables the ability to lookup items by key or position. This also enables keys to be found by items or position. 
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">key</span>:*</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code></td>
</tr>
</table>
</div>
<a name="containsItem()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">containsItem</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function containsItem(item:*):Boolean</code><p>
   Looks up the requested item and returns true if the item is contained, false if it is not.
    
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">item</span>:*</code> &mdash; Item to lookup.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if found, false if not.
   
   </td>
</tr>
</table>
</div>
<a name="containsKey()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">containsKey</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function containsKey(key:*):Boolean</code><p>
   Looks up the requested key and returns true if the key is contained, false if it is not.
    
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">key</span>:*</code> &mdash; Key to lookup.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; True if found, false if not.
   
   </td>
</tr>
</table>
</div>
<a name="getAllItems()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getAllItems</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getAllItems():Array</code><p>
   Returns all items stored in the HashTable.  The returned Array is a clone of the stored array to prevent key pair corruption.
    
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code> &mdash; Array of all the contained items.
   
   </td>
</tr>
</table>
</div>
<a name="getAllKeys()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getAllKeys</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getAllKeys():Array</code><p>
   Returns all keys stored in the HashTable. The returned Array is a clone of the stored array to prevent key pair corruption.
   
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code> &mdash; Array of all the contained keys.
   
   </td>
</tr>
</table>
</div>
<a name="getItem()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getItem</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getItem(key:*):*</code><p>
   Returns the item for the specified key, if the key is not found then the method returns null.
    
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">key</span>:*</code> &mdash; Key object to look up item.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; Item bound to key.
   
   </td>
</tr>
</table>
</div>
<a name="getKeyAt()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getKeyAt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getKeyAt(position:int):*</code><p>
   Returns the key at a specified position if the HashTable has that position available.
    
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">position</span>:int</code> &mdash; Position to return key.
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; Key at specified position.
   
   </td>
</tr>
</table>
</div>
<a name="remove()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">remove</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function remove(key:*):void</code><p>
   Removes an item/key pair based on the key provided.
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">key</span>:*</code> &mdash; Key to remove item on.
   
   </td>
</tr>
</table>
</div>
<a name="removeAll()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeAll</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeAll():void</code><p>
   Removes all items and keys from the HashTable. 
   
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
